package Level01;

import java.util.ArrayList;
import java.util.Collections;

public class Four {
    public static <A> void deleteElements(ArrayList<A> array){
        array.remove(0);
        array.remove(array.size()-1);
        System.out.println(array);
    }
    public static void main(String[] args) {
        ArrayList<Object> arrayList = new ArrayList<>();
        Collections.addAll(arrayList, 1,2,3,4,5);
        deleteElements(arrayList);
    }
}
